import type {
  PaginationProps,
  TableColumnData,
  TableRowSelection,
} from "@arco-design/web-vue";
import type { VNodeChild } from "vue";

export interface TableProps {
  // 自定义属性
  tableHeader?: TableHeader[];
  columns: TableColumnData[];
  data: any[];
  stripe?: boolean;
  border?: boolean;
  scrollbar?: boolean;
  rowKey?: string;
  scroll?: {
    x?: number | string;
    y?: number | string;
    minWidth?: number | string;
    maxHeight?: number | string;
  };
  rowSelection?: TableRowSelection | any;
  subtractHeight?: number;
  total?: number;
  pageSize?: number;
  current?: number;
  pagination?: PaginationProps;
  height?: string | number;
  [key: string]: any;
}
export interface TableHeader {
  key?: number;
  name: string;
  type?: "button" | "render";
  label?: string;
  align?: "left" | "right";
  icon?: string;
  disabled?: boolean;
  render?: (data: any) => VNodeChild;
  [key: string]: any;
}
